unpack_by_attribute

function unpack_by_attribute(instance: instance, attribute: attribute): ((K: type, V: type), values: map<gtv, gtv>)?